package com.spring;


/**
    *Bean后置处理器,Spring容器在初始化bean的时候，会回调BeanPostProcessor中的两个方法
    * @author fanzitianxing
    * @date 2021/9/7
    * @param
    * @return
    */
public interface BeanPostProcessor {

    /**
        *初始化前
        * @author fanzitianxing
        * @date 2021/9/7
        * @param [bean, beanName]
        * @return java.lang.Object
        */
    default Object postProcessBeforeInitialization(Object bean, String beanName) {
        return bean;
    }

    /**
        *初始化后
        * @author fanzitianxing
        * @date 2021/9/7
        * @param [bean, beanName]
        * @return java.lang.Object
        */
    default Object postProcessAfterInitialization(Object bean, String beanName) {
        return bean;
    }
}